package com.zzyl.mapper;

import com.zzyl.entity.NursingLevel;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface NursingLevelMapper {
    @Select("select * from nursing_level ")
    NursingLevel[] listAll();

    void addNursingLevel(NursingLevel nursingLevel);

    List<NursingLevel> list(String name, Integer status);

    @Select("select * from nursing_level where id=#{id}")
    NursingLevel findById(Long id);

    void update(NursingLevel nursingLevel);

    @Delete("delete from nursing_level where id=#{id}")
    void delete(Long id);

    @Update("update nursing_level set status=#{status} where id=#{id}")
    void updateStatus(Long id, Integer status);
}
